/**
 * EChart 图表基本配置常量
 */

var ECHART_BASE_CONFIG_LINE_TIPS = {
    tooltip: {
        trigger: 'axis',
        formatter: function (a) {
            var str = "<div style='text-align: left'>";
            if (a) {
                for (i in a) {
                    var b = a[i];
                    if (i === 0) {
                        str += b.name + "<br />";
                    }
                    str += "<p style='margin-bottom: 1px'><span style='display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:" + b.color + ";'></span>" + b.seriesName + " &nbsp;&nbsp;&nbsp;<span class='pull-right'>" + b.value + "</span></p>";
                }
            }
            str += "</div>";
            return str;
        },
        position: function (p) {
            var x = p[0];
            if (x > 500) {
                x = x - 180;
            }
            p[0] = x;
            return p;
        }
    }
};
